The present invention relates to an image capturing device for capturing a two-dimensional image of an object, and more particularly to an image capturing device provided with a focusing system which brings an imaging lens to an in-focus position.
Conventionally, various camera-like image reading devices have been suggested. A typical example of such an image reading device is provided with a line image sensor which is driven to move in a direction perpendicular to the direction in which the line image sensor extends. Generally, in such an image reading device, a distance to the object is not fixed. In order to obtain an in-focus image of the object, it is necessary to obtain information related to the object distance, and an imaging lens of the image reading device is to be located at an in-focus position.
In cameras using photographing film, an automatic focusing system is generally provided. As the automatic focusing system, an active system utilizing infrared light or a passive system which detects the focusing condition in accordance with a phase difference or a difference of contrast of images is known. Based on the data related to the object obtained by the active or passive system, the automatic focusing system drives a focusing lens to an appropriate position so that the in-focus image is formed on the photographing film.
In the conventional image reading system utilizing the line image sensor, it is difficult to obtain the data related to the object distance based on the phase difference or contrast distribution using the imaging optical system and the image sensor. Thus, in the conventional image reading system, the automatic focusing system as employed in the cameras should be provided separately from the image capturing system. Since the separate focusing system is to be accommodated, the image reading devices have been prevented from being made compact.
It is therefore an objet of the invention to provide an improved image capturing device which is capable of using an image reading system for capturing system as a passive type focusing system, and detecting an in-focus position of the imaging lens accurately even if light illuminating the object fluctuates.
For the above object, according to the invention, there is provided a focusing system of a scanner, which is provided with an imaging lens; a line image sensor having a plurality of pixels arranged in a line for capturing a one-dimensional image; a lens drive system that drives the imaging lens with respect to the image sensor within a predetermined movable range; a contrast data detecting system that detects a contrast data representing brightness gradient with respect to a pixel located in a predetermined area on the line image sensor; a lens position detecting system that controls the lens drive system to sequentially change a position of the imaging lens within the predetermined movable range and controls the contrast data detecting system to repeatedly detects contrast data at each position of the imaging lens, the lens position detecting system detects a pixel with respect to which the brightness gradient is greatest and a lens position when the brightness gradient of the pixel is greatest; and a controller that controls the lens drive system to locate the imaging lens at the position detected by the lens position detecting system.
With this focusing system, even if an object to be scanned by the scanner is illuminated by a light source such as a fluorescent lamp, the focusing condition can be detected accurately based on the contrast data. Accordingly, a relative distance between the image sensor and the imaging lens can be accurately adjusted such that an in-focus image is formed on the image sensor.
In particular, the lens drive system may move only the imaging lens in a direction of an optical axis of the imaging lens to adjust the focusing condition.
Optionally, the lens drive system may move the imaging lens stepwisely at a predetermined pitch from a first end to a second end within the movable range of the imaging lens.
Further, the first end may be a near end point of the imaging lens, and the second end may be a far end point of the imaging lens.
Further optionally, the brightness gradient with respect to a pixel is a difference between brightness values of two pixels adjacent to the target pixel, and the contrast detecting system detects the brightness gradient only when brightness values of the pixel and the two adjacent pixels change (i.e., increase or decrease) monotonically.
Still optionally, the lens position detecting system may include a brightness gradient data memory for storing a brightness gradient value, a pixel with respect to which the brightness gradient value is detected, and a position at which the brightness gradient value is detected, for each of a predetermined number of brightness values whose values are greater than the other of brightness gradient values which have been detected, and the lens position detecting system detects a position of the imaging lens at which the brightness gradient value is the greatest as the in-focus position of the imaging lens.
According to another aspect of the invention, there is provided a scanner, which is provided with an imaging lens; a line image sensor having a plurality of pixels arranged in a line for capturing a one-dimensional image; a lens drive system that drives the imaging lens with respect to the image sensor within a predetermined movable range; a contrast data detecting system that detects a contrast data representing brightness gradient with respect to a pixel located in a predetermined area on the line image sensor; a lens position detecting system that controls the lens drive system to sequentially change a position of the imaging lens within the predetermined movable range and controls the contrast data detecting system to repeatedly detects contrast data at each position of the imaging lens, the lens position detecting system detects a pixel with respect to which the brightness gradient is greatest and a lens position when the brightness gradient of the pixel is greatest; a controller that controls the lens drive system to locate the imaging lens at the position detected by the lens position detecting system; a rotatable mirror provided between the object and the imaging lens, the rotatable mirror being rotatable about an axis extending in a direction parallel to a direction in which the plurality of pixels are arranged. In this scanner, light from a part of the object is reflected by the rotatable mirror and incident on the image sensor through the imaging lens, two-dimensional image of the object being captured as the rotatable mirror is rotated.
Optionally the lens position detecting system detects the position of the imaging lens with the rotatable mirror located at a predetermined reference position.
Specifically, the predetermined-reference position of the rotatable mirror is a position at which an optical axis of the imaging lens intersects a reflection surface of the rotatable mirror at 45 degrees.